<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1 maximum-scale=1.0, user-scalable=0">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>Anonbot WL</title>
    <link href="../public/style.css" rel="stylesheet">
  </head>
  <body>
    <h1>Anonbot WL</h1>
    <h6>While you're here, considering joining the <a href="https://groupme.com/join_group/48094446/rZP53SPl">Community GroupME!</a></h6>
    <form action="/submission" method="post" id="f" class="f">
      <textarea id="m" name="anon" type="text" cols="36" rows ="7" placeholder="Say something..." autofocus></textarea>
    </form>
    <button type="submit" form="f" onclick="this.disabled=true;this.value='Submitting...'; this.form.submit();">
      <strong>Submit</strong></button>
    <a href="https://anonbotwl.glitch.me/respond"><p>Want to anonymously respond to a post instead?</p></a>
    <br/>
    <a href="https://github.com/MatthewStanciu/Anonbotv2" target="_blank"><p>View code on GitHub</p></a>

    <div id="snackbar">You can only comment on Anonbot posts!</div>
    <script>
      if (document.referrer === "http://localhost:3000/comment" || document.referrer === "https://anonbotwl.glitch.me/comment") {
        showSnackbar();
      }
      function showSnackbar() {
        var x = document.getElementById("snackbar");
        x.className = "show";
        setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
      }
    </script>
  </body>
</html>
